<?php
/**
 * myHeader.php
 * 
 * (C) 2009, tetsuya.odaka(EzoGP).
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* 
 * アプリケーションプログラムの前処理
 *      
 *		author	; t.odaka
 *		date	; 2009/5/12
*/

	// セッションの開始
	session_start();

	// myznala 定義ファイルの読み込み
	require_once('../Myznala/Config.php');

	// ErrorBean	
	require_once('../Myznala/ErrorBean.class.php');
	// MsgBean	
	require_once('../Myznala/MsgBean.class.php');
	// ユーティリティー	
	//require_once('../Myznala/myznala_func.php');

	// Dwoo オブジェクトの生成 
	include '../dwoo/dwooAutoload.php';
//	$options = array(
//    	'engine'   => array(
//        	'compileDir' => 'D:/workspace3.4/Myznala_Base/dwoo/compiled',
//        	'cacheDir' => 'D:/workspace3.4/Myznala_Base/dwoo/cache'
//    	),
//    	'compiler' => array('autoEscape' =>true)
//	);
	
	$myznala = new Dwoo();
	$myznala->clearCache();

	// プログラム名の設定
	$myPageName=$_SERVER["PHP_SELF"];

	// ログの出力(start)
	$myLog->debug("$myPageName: start");
	
	// ユーザー名の取得
	$myLoginUser=null;
	if(AUTH_TYPE!="NONE"){
		if(isset($_SESSION['Email'])) {
			$myLoginUser = $_SESSION['Email'];
		}
	}
	if($myLoginUser == null){
		$myLoginUser="guest";
	}
?>